﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteNoViewData.Master"
    AutoEventWireup="true" CodeBehind="Error.aspx.cs" Inherits="Yonkly.Views.Shared.Error" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <h2>
        Oops!!!</h2>
    <h3>
        Congratulations you are the first one to discover this error page. Our engineers
        have been notified and will work on hiding it and it will be your job to find it
        again.</h3>
    <%try {if (Convert.ToBoolean(ConfigurationManager.AppSettings["EnableDebugging"]) && Session["lasterror"] != null)
      {%>
    <h2>
        Exception</h2>
    <%= ((Exception)Session["lasterror"]).Message    %><br />
    <h2>
        Stack Trace</h2>
    <%= ((Exception)Session["lasterror"]).StackTrace    %><br />
    <h2>
        Inner Exception</h2>
    <%= ((Exception)Session["lasterror"]).InnerException != null ? ((Exception)Session["lasterror"]).InnerException.Message : ""%><br />
    <%= ((Exception)Session["lasterror"]).InnerException.InnerException != null ?  ((Exception)Session["lasterror"]).InnerException.InnerException.Message : ""%><br />
    <%= ((Exception)Session["lasterror"]).InnerException.InnerException.InnerException  != null ? ((Exception)Session["lasterror"]).InnerException.InnerException.InnerException.Message : "" %><br />
    <%= ((Exception)Session["lasterror"]).InnerException.InnerException.InnerException.InnerException != null ? ((Exception)Session["lasterror"]).InnerException.InnerException.InnerException.InnerException.Message : "" %><br />
    <%
        Session["lasterror"] = null;
      }} catch {}%>
</asp:Content>
